Function.prototype.myapply=function(context){
    if(typeof this !=='function'){
        throw new TypeError
    }
    const fn=Symbol('fn');
    //上下文环境
    context=context||window;
    //this绑定
    context[fn]=this;
    let result;
    if(arguments[1]){
        result=context[fn](...arguments[1])
    }else{
        result=context[fn];
    }
    delete context[fn];
    return result;
}
